#include "resource.h"

resource::resource(void)
{
	position = vertex(randRange(-100, 100), randRange(-100, 100));

	value = randRange(50, 509.999);
	value -= value % 10;

	size = 1 + value / 300.0;
}

resource::~resource(void)
{
}


void resource::Draw()
{
	glColor3f(0.8, 0.2, 0.75);
	glBegin(GL_QUADS);
		glVertex2f(position.x - size, position.y - size); 
		glVertex2f(position.x + size, position.y - size);
		glVertex2f(position.x + size, position.y + size);
		glVertex2f(position.x - size, position.y + size);
	glEnd();
}